package com.javasee.common.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * Project Name:
 * File Name   :
 * Package Name:
 *
 * @author : xinyanfei
 * @date :2025-08-30 12:57:49
 * Copyright (c) , 京东商城  All Rights Reserved.
 */

@Slf4j
@Configuration
@EnableConfigurationProperties({ApplicationProperties.class})
public class CommonConfig implements InitializingBean {

    @Autowired
    private ApplicationProperties applicationProperties;

    @Override
    public void afterPropertiesSet() throws Exception {
        //log.info("applicationProperties.getModules() = " + applicationProperties.getModules());
        //log.info("applicationProperties.getRabbitmq() = " + applicationProperties.getRabbitmq());
        ApplicationUtils.setApplicationProperties(this.applicationProperties);
    }

}
